package com.hdoit.kylin.web.studentManager.modelconfig;
import com.hdoit.kylin.web.studentManager.providers.FinalSpeechStateProvider;
import com.hdoit.kylin.web.user.modelconfig.StudentConfig;
import com.hdoit.kylin.web.user.modelconfig.TeacherConfig;
import com.hdoit.kylin.web.user.provider.StudentProvider;
import com.hdoit.kylin.web.user.provider.TeacherProvider;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author liuli
 * @email
 * @createtime 2017年07月31日 10:23:42
 * @comment
 */
public class FinalSpeechConfig extends ModelMetadataAttributeConfiguration {
	public FinalSpeechConfig() {
		this.setProperty("checkId")
			.hasAttribute(new DisplayNameAttribute("检查人"))
			.hasAttribute(new RequiredAttribute("检查人为必填项"))
			.hasAttribute(new DropDownListAttribute(new TeacherProvider(TeacherConfig.class.getName())));
		this.setProperty("checkedId")
			.hasAttribute(new DisplayNameAttribute("被检查人"))
			.hasAttribute(new RequiredAttribute("被检查人为必填项"))
			.hasAttribute(new DropDownListAttribute(new StudentProvider(StudentConfig.class.getName())));
		this.setProperty("speechStatus")
			.hasAttribute(new DisplayNameAttribute("状态"))
			.hasAttribute(new DropDownListAttribute(new FinalSpeechStateProvider()));
		this.setProperty("checkDate")
			.hasAttribute(new DisplayNameAttribute("日期"));
		this.setProperty("checkPlace")
			.hasAttribute(new DisplayNameAttribute("地点"));
		this.setProperty("fileAddress")
			.hasAttribute(new DisplayNameAttribute("答辩文件材料"));
		this.setProperty("speechVersion")
			.hasAttribute(new DisplayNameAttribute("版本"));
		this.setProperty("comments")
			.hasAttribute(new DisplayNameAttribute("备注"));
	}
}